package com.zzzyh.blogbyspring.pojo;

import com.zzzyh.blogbyspring.utils.DateUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BlogInfo {
    private Integer id;
    private String title;
    private String content;
    private Integer userId;
    private Integer deleteFlag;
    private Date createTime;
    private Date updateTime;
    private Boolean isLoginUser;

    public String getCreateTime() {
        return DateUtils.getFormattedDate(this.createTime);
    }

    public String getUpdateTime() {
        return DateUtils.getFormattedDate(this.updateTime);
    }
}
